algorithms to live